package com.loft.model;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import android.util.Log;

import com.loft.comm.util.LogCenter;
import com.loft.vo.renren.ProfileVo;
import com.loft.vo.renren.UserVo;
import com.loft.vo.renren.Vo;

/**
 * @author
 * @class_name JRRGetProfileInfo.java
 * @create_date 2012/05/28
 * @version 1.0.0
 */
public class JRRGetProfileInfo extends JSONDataCenter {
	public static final String TAG = "JRRGetProfileInfo";
	private String _fileds = "base_info,status,visitors_count,blogs_count,albums_count,friends_count,guestbook_count, status_count，";

	public JRRGetProfileInfo(String uid) {
		_addParaMap = new HashMap<String, String>();
		_addParaMap.put("method", "users.getProfileInfo");
		if (uid != null) {
			_addParaMap.put("uid", uid);
		}
		_addParaMap.put("fields", _fileds);
		LogCenter.getInstance().debugRESULT(
				uid + "---------->>>JRRGetProfileInfo");
	}

	@Override
	public List<? extends Vo> parseJsonData(String jsonString) {
		try {
			List<ProfileVo> profileVoList = new ArrayList<ProfileVo>();
			profileVoList.add(JSONHelper.parseObject(jsonString,
					ProfileVo.class));
			return profileVoList;
		} catch (JSONException e) {
			LogCenter.getInstance().error(TAG, e.toString());
		}
		return null;
	}

}
